﻿<div>

<h2>JavaScript 代码：</h2>
<textarea name="dp-syntaxhighlighter" class="brush: js; highlight: [6,11]" >
    
    $(function () {
        var data = $.map($.fn.validatebox.defaults.rules, function (val, n) { return { value: n, text: n }; });

        var text = $("#Text1"), cc = $("#select1").combobox({
            width: 120, data: data, onChange: function (val) {
                text.validatebox("options").validType = val;
            }
        });

        $("#Button1").click(function () {
            text.validatebox("validate");
        });
    });

</textarea>
<h2>HTML 代码：</h2>
<textarea name="dp-syntaxhighlighter" class="brush: html; highlight: []" >
    
    <input id="Button1" type="button" value="刷新输入框的验证状态" />
    <select id="select1" ></select>
    <input id="Text1" class="easyui-validatebox" data-options="required: true" />

</textarea>


</div>